function gmsh2pos(meshfile, eval_routine, posfile)

mesh = load_gmsh(meshfile);

Node = mesh.POS;
Elem = mesh.TETS;

% user should supply
val = feval(eval_routine, Node, Elem);

write_gmsh_pos(Node, Elem, val, posfile);

end